<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="libman.css">
<TITLE>
Multiple Solver States
</TITLE>
</HEAD>
<BODY >
<A HREF="libman057.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="libman052.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="libman059.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc132">9.6</A>&nbsp;&nbsp;Multiple Solver States</H2>
This library allows multiple solver states to be maintained in the same
program. Each solver state represents an eplex problem. For the external
solver, each solver state is completely independent. For ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP>, the
solver states may share variables in the constraints or objective
functions, but the constraints posted to the problem and to the cutpools
are specific to each solver state. The eplex library maintains separate
solution values for each solver state, and it is up to the user to
reconcile these solution values if they are different.<BR>
<BR>
<A NAME="@default340"></A>
When two eplex variables are unified, then the library ensures that the
now single variable maintains the eplex values from both variables. The one
exception is when two variables from the same solver state is unified.In
this case, eplex will merge its representations of the two columns into one:
the bounds of the columns are merged (and failure will occur if the
merged bound is empty); all the unified columns are constrained to integers
if one of them was constrained to integer previously, and 
an equality constraint between the two variables is sent to the
solver state, but the user can only obtain one eplex value from the unified
variable, even though in the external solver, the variable is still
represented as two variables (columns in the matrix). <BR>
<BR>
It is possible to turn off this automatic sending of the equality
constraints by specifying `no' for the option <TT>post_equality_when_unified</TT> (in solver setup, or via <CODE>eplex_set/2</CODE>). 
The reason is that some solvers automatically perform unification
when they know that two variables are the same. For example, for
the constraint <TT>X $= Y + Z</TT>, if <TT>Y</TT> becomes 0, then <TT>X</TT> and
<TT>Z</TT> may be unified by the solver maintaining the constraint. If the
same constraint was also posted to the eplex solver state, then there is no
need to send the redundant constraint. However, if the external solver
state did not have the constraint, then it can become inconsistent with
that of ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> if the equality constraint is not sent. Therefore, only
turn off sending of equality constraints if you are certain you know what
you are doing.<BR>
<BR>
The merging of the bounds may trigger the solver if the bounds trigger
condition was specified. Note however that the deviating_bounds trigger
condition is not tested for, because there is no longer a valid solution
value for the merged columns. <BR>
<BR>
<HR>
<A HREF="libman057.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="libman052.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="libman059.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
